﻿/// <reference path="turbo_common.js" />
/// <reference path="../General/Json.js" />

var $ResponseValidator = TA.Turbo.Common.ResponseValidator = function ResponseValidator()
{
}
$ResponseValidator.Inherit(BaseJsonDeserializable);

$ResponseValidator.prototype.Id = "";
$ResponseValidator.prototype.Value = null;
$ResponseValidator.prototype.Properties = null;

$ResponseValidator.prototype.DeserializeContent = function DeserializeContent(prShortName, value)
{
	switch (prShortName)
	{
		case "I": this.Id = value; break;
		case "V": this.IsValid = value; break;
	}
}

$ResponseValidator.prototype.Process = function Process()
{
	var ctl = $GetObject(this.Id);
	if (ctl != null)
	{
		ctl.set_IsValid(this.IsValid);
	}
}